package com.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 用户表
 */
@Data
@TableName("user")
public class UserEntity implements Serializable {

    @TableId(value = "pk_userId" ,type = IdType.AUTO)
    private long userId;

    @TableField("u_num")
    private long userRef;//唯一编号

    @TableField("u_name")
    private String name;//用户名

    @TableField("u_pwd")
    private String pwd; //密码

    @TableField("u_discount")
    private double discount=1.0;//折扣率

    @TableField("u_balance")
    private double balance;//余额

    @TableField("u_verifyStatus")
    private int verifyStatus = 0;//审核状态 0--待审核  1---审核通过 2 ----审核不通过


    @TableField("u_frozenState")
    private int frozenState;//冻结状态

    @TableField("u_frozenReason")
    private String frozenReason;//冻结原因

    @TableField(exist = false)
    private List<ChargeRecordEntity> chargeRecordEntityList ;//用户对应的所有充值记录

    @TableField(exist = false)
    private UserRecordEntity userRecordEntity;//用户对应的审核记录

    @TableField(exist = false)
    private List<UserOrderEntity> userOrderEntityList;//用户对应的所有订单
}
